package dialer.ws.base.entity;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Contact entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "contact", schema = "call_center")
public class Contact implements java.io.Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -8569880802533070291L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false)
	private Integer id;

	@Column(name = "cedula_ruc", nullable = false)
	private String cedulaRuc;

	@Column(name = "name", nullable = false)
	private String name;

	@Column(name = "telefono", nullable = false)
	private String telefono;

	@Column(name = "apellido", nullable = false)
	private String apellido;

	@Column(name = "origen", length = 4)
	private String origen;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contact")
	private List<CallEntry> listCallEntry;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getCedulaRuc() {
		return cedulaRuc;
	}

	public void setCedulaRuc(String cedulaRuc) {
		this.cedulaRuc = cedulaRuc;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTelefono() {
		return telefono;
	}

	public void setTelefono(String telefono) {
		this.telefono = telefono;
	}

	public String getApellido() {
		return apellido;
	}

	public void setApellido(String apellido) {
		this.apellido = apellido;
	}

	public String getOrigen() {
		return origen;
	}

	public void setOrigen(String origen) {
		this.origen = origen;
	}

	public List<CallEntry> getListCallEntry() {
		return listCallEntry;
	}

	public void setListCallEntry(List<CallEntry> listCallEntry) {
		this.listCallEntry = listCallEntry;
	}

}